<template>
   <div class="form">
      <div class="form-group">
          <input v-model="current.name" type="text" placeholder="请填写品牌名称" class="form-control">
      </div>
      <div class="form-group">
          <button @click="updateHandle" class="btn btn-primary">更新品牌</button>
      </div>
  </div>
</template>

<script>
import { mapState,mapMutations,mapActions,mapGetters } from 'vuex';
export default {
    data(){
        return {
        }
    },
    computed:{
        ...mapGetters(['brandsCount']),
        ...mapState(['current'])
    },
    methods:{
        ...mapMutations(['getBrands','add','update','del']),
        ...mapActions(['getInitBrands','addBrand','updateBrand','delBrand']),
        updateHandle(){
            this.updateBrand(this.current);
        }
    }
}
</script>

<style>

</style>